]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
unlock: Don't show prompt on shifty key presses
authorFlorian Müllner <fmuellner@gnome.org>
Fri, 14 Feb 2020 19:19:37 +0000 (20:19 +0100)
committerFlorian Müllner <fmuellner@gnome.org>
Fri, 14 Feb 2020 20:57:03 +0000 (21:57 +0100)
Shift, caps-lock and friends change the capitalization of following
key presses. It is unexpected for those keys to have side-effects,
so don't switch to the prompt when they are pressed.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/2215

js/ui/unlockDialog.js

index 7a6c936121847c46abbf5f454e4c54147c7b03e4..70968ad4d81f71b4417783254ddbf669bbbff269 100644 (file)
@@ -593,6 +593,13 @@ var UnlockDialog = GObject.registerClass({
             (this._promptBox && this._promptBox.visible))
             return Clutter.EVENT_PROPAGATE;
 
+        const { keyval } = keyEvent;
+        if (keyval === Clutter.KEY_Shift_L ||
+            keyval === Clutter.KEY_Shift_R ||
+            keyval === Clutter.KEY_Shift_Lock ||
+            keyval === Clutter.KEY_Caps_Lock)
+            return Clutter.EVENT_PROPAGATE;
+
         let unichar = keyEvent.unicode_value;
 
         this._showPrompt();